from machine import Pin
import time

print("已进入示例点灯程序")

led_gpio = 10                       # 定义LED灯所使用的引脚编号，ESP32默认板载LED例子是22引脚来控制的
led_pin = Pin(led_gpio, Pin.OUT)    # 将定义的引脚定义为电流输出模式

led_status = True
while True:
    led_status = not led_status
    if led_status:
        led_pin.on()
    else:
        led_pin.off()
    time.sleep(1)